#ifndef DASHBOARDWIDGET_H
#define DASHBOARDWIDGET_H

#include <QWidget>
#include <QMap>

class QLabel;
class QQuickWidget;
class QVBoxLayout;
class QHBoxLayout;

class DashboardWidget : public QWidget
{
    Q_OBJECT
public:
    explicit DashboardWidget(QWidget *parent = nullptr);

    // 设置参数值
    void setParameter(const QString &name, double value);
    void setParameterHighlight(const QString &name, bool highlight);
protected:
    void resizeEvent(QResizeEvent *event) override;
private:
    QMap<QString, QLabel*> paramLabels;
    QQuickWidget *gaugeQmlWidget; // QML仪表盘
    QVBoxLayout *mainLayout;
    QHBoxLayout *contentLayout;
};

#endif // DASHBOARDWIDGET_H 